package com.anjie.powerproject.map;

import com.anjie.powerproject.entity.Model;
import com.anjie.powerproject.pojo.dto.ModelVersion;

import java.util.List;

public interface ModelMap {
    ModelVersion toDTO(Model model);

    List<ModelVersion> toDTO(List<Model> models);

    default Boolean intToBool(Integer val) {
        if (val == null || val == 0) {
            return Boolean.FALSE;
        }
        return Boolean.TRUE;
    }
}
